package com.sirui.spider.kuai.entity;

import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * (Kuai)实体类
 *
 * @author linson
 * @since 2023-07-14 10:37:29
 */
@Data
@Entity(name = "Kuai")
@Table(name = "kuai")
@org.hibernate.annotations.Table(appliesTo = "kuai", comment = "")
public class Kuai implements Serializable {
    private static final long serialVersionUID = -71237303986448176L;
    /**
     * id
     */
    @Id
    //@GeneratedValue(strategy = GenerationType.IDENTITY)
    //@Column(name = "id")
    @Column(name = "id", length = CommonConstants.HIBERNATE_UUID_LENGTH, unique = true)
    @GeneratedValue(generator = CommonConstants.HIBERNATE_GENERATOR_UUID)
    @org.hibernate.annotations.GenericGenerator(name = CommonConstants.HIBERNATE_GENERATOR_UUID, strategy = CommonConstants.HIBERNATE_STRATEGY_UUID)
    private String id;
    /**
     * 内容
     */
    @Comment("内容")
    //@Column(name = "content", columnDefinition = "TEXT") // mysql
    @Column(name = "content", columnDefinition = "CLOB") // oracle
    private String content;

    @Column(name = "img_count")
    @Comment("图片数量")
    private Integer imgCount;

    @Column(name = "create_date")
    @Comment("")
    private Date createDate;

    @Column(name = "update_date")
    @Comment("")
    private Date updateDate;

    /**
     * ${column.comment}
     */
    @Column(name = "page_url", length = 255)
    @Comment("")
    private String pageUrl;

    @Column(name = "publish_date")
    @Comment("发布时间")
    private Date publishDate;

    @Comment("是否保存图片")
    private Boolean savePicStatus = false;
    /**
     * ${column.comment}
     */
    @Column(name = "title", length = 255)
    @Comment("标题")
    private String title;
}

